package com.chinackts.common.utils.menumanager;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;

import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

/**
 * @author Lianhong
 * @since 2021/12/1
 * 单一窗口采集响应数据解密
 */
public class DecMenuManager {

    private static final short[] S_BOX = {199, 211, 141, 152, 77, 30, 8, 105, 148, 71, 240, 236, 75, 112, 59, 196, 18, 123, 101, 197, 71, 228, 146, 56, 28, 217, 59, 125, 131, 202, 234, 24, 109, 32, 100, 179, 68, 166, 217, 215, 149, 224, 253, 133, 209, 202, 233, 221, 79, 121, 88, 31, 191, 221, 84, 127, 100, 200, 200, 81, 168, 114, 125, 9, 74, 19, 180, 65, 81, 199, 161, 131, 53, 20, 62, 89, 72, 232, 88, 231, 128, 9, 201, 62, 129, 190, 22, 210, 200, 78, 90, 54, 100, 242, 145, 184, 195, 88, 114, 43, 105, 147, 63, 91, 158, 14, 178, 4, 166, 137, 218, 171, 13, 164, 202, 27, 223, 199, 156, 194, 183, 177, 247, 139, 116, 136, 92, 204, 187, 57, 27, 199, 40, 46, 219, 106, 128, 122, 191, 174, 230, 59, 194, 1, 193, 116, 147, 162, 55, 180, 166, 73, 102, 121, 109, 36, 190, 239, 190, 147, 149, 237, 33, 64, 10, 86, 156, 143, 137, 217, 158, 26, 114, 178, 176, 137, 84, 145, 43, 222, 228, 138, 186, 180, 154, 222, 96, 44, 193, 20, 20, 40, 144, 92, 8, 212, 98, 216, 149, 81, 201, 162, 114, 71, 240, 178, 182, 52, 49, 224, 44, 83, 63, 168, 197, 229, 54, 239, 52, 244, 33, 126, 222, 196, 84, 62, 106, 194, 115, 172, 181, 206, 25, 231, 221, 167, 99, 150, 74, 151, 178, 170, 4, 182, 194, 80, 192, 41, 4, 188, 51, 15, 43, 88, 239, 221};
    private static final long[] CK =
            {
                    373238264, 1653033269, 1436872235, 1400859568,
                    1559030173, 2518913733L, 580788207, 477163403,
                    2124359553, 3755667765L, 4117292849L, 3927877911L,
                    8387004, 1305016879, 2858349039L, 2146564323,
                    713212734, 3973644786L, 1092903956, 3283129280L,
                    193792014, 727356605, 4068241274L, 3526037302L,
                    776329344, 1517051264, 3927749847L, 385107707,
                    356705067, 2274250977L, 3175428638L, 4125771267L
            };

    private static final long[] FK = {1472528248, 2834402020L, 3539074277L, 873194803};

    private static int mode = 0;
    private static long[] sk = new long[32];
    private static boolean isPadding = true;

    public synchronized static String mudata_kxc(String data, String key) {
        if (StringUtils.isBlank(data)) return StringUtils.EMPTY;
        long[] keyArr = new long[key.length()];
        for (int i = 0; i < key.length(); i++) {
            keyArr[i] = key.charAt(i);
        }
        genSk(keyArr);
        long[] dataArrays = dataArrays(data);
        if (dataArrays == null) return StringUtils.EMPTY;

        byte[] dataBytes = new byte[dataArrays.length];
        for (int i = 0; i < dataArrays.length; i++) {
            dataBytes[i] = (byte) dataArrays[i];
        }
        return new String(dataBytes, StandardCharsets.UTF_8);
    }

    private static void genSk(long[] keyArr) {
        long[] a = new long[4];
        a[0] = leftShift(keyArr, 0);
        a[1] = leftShift(keyArr, 4);
        a[2] = leftShift(keyArr, 8);
        a[3] = leftShift(keyArr, 12);

        long[] b = new long[36];
        b[0] = a[0] ^ BigInteger.valueOf(FK[0]).intValue();
        b[1] = a[1] ^ BigInteger.valueOf(FK[1]).intValue();
        b[2] = a[2] ^ BigInteger.valueOf(FK[2]).intValue();
        b[3] = a[3] ^ BigInteger.valueOf(FK[3]).intValue();

        for (int i = 0; i < 32; i++) {
            long tmp = b[i + 1] ^ b[i + 2] ^ b[i + 3] ^ CK[i];

            long[] c = new long[4];
            long[] d = new long[4];

            c[0] = 255 & tmp >> 24;
            c[1] = 255 & tmp >> 16;
            c[2] = 255 & tmp >> 8;
            c[3] = 255 & tmp;

            d[0] = S_BOX[(int) (255 & c[0])];
            d[1] = S_BOX[(int) (255 & c[1])];
            d[2] = S_BOX[(int) (255 & c[2])];
            d[3] = S_BOX[(int) (255 & c[3])];

            int tmp0 = (int) (((255 & d[0]) << 24)
                    | ((255 & d[1]) << 16)
                    | ((255 & d[2]) << 8)
                    | (255 & d[3]));

            b[i + 4] = b[i] ^
                    (tmp0 ^ ((tmp0 << 13) | (tmp0 >> 32 - 13)) ^
                            ((tmp0 << 23) | (tmp0 >> 32 - 23)));
            sk[i] = b[i + 4];
        }
        ArrayUtils.reverse(sk);
    }

    private static long[] dataArrays(String data) {
        try {
            byte[] bytes = Base64.decodeBase64(data);
            long[] valueArray = new long[bytes.length];
            for (int i = 0; i < bytes.length; i++) {
                valueArray[i] = bytes[i];
            }
            long[] r = new long[0];
            for (int i = 0; i < valueArray.length; i += 16) {
                long[] a = new long[]{
                        valueArray[i],
                        valueArray[i + 1],
                        valueArray[i + 2],
                        valueArray[i + 3],
                        valueArray[i + 4],
                        valueArray[i + 5],
                        valueArray[i + 6],
                        valueArray[i + 7],
                        valueArray[i + 8],
                        valueArray[i + 9],
                        valueArray[i + 10],
                        valueArray[i + 11],
                        valueArray[i + 12],
                        valueArray[i + 13],
                        valueArray[i + 14],
                        valueArray[i + 15],
                };
                long[] tmpArr = genArrBySk(a);
                r = appendArray(r, tmpArr);
            }
            return handleByMode(r);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static long[] appendArray(long[] original, long[] n) {
        long[] result = new long[original.length + n.length];
        System.arraycopy(original, 0, result, 0, original.length);
        int index = 0;
        for (int i = original.length; i < original.length + n.length; i++) {
            result[i] = n[index];
            index++;
        }
        return result;
    }

    private static long[] genArrBySk(long[] a) {
        long[] buf = new long[36];
        buf[0] = leftShift(a, 0);
        buf[1] = leftShift(a, 4);
        buf[2] = leftShift(a, 8);
        buf[3] = leftShift(a, 12);

        for (int i = 0; i < 32; i++) {
            long tmp = (buf[i + 1] ^ buf[i + 2] ^ buf[i + 3]) ^ sk[i];

            long[] b = new long[4];
            b[0] = (int) (255 & tmp >> 24);
            b[1] = (int) (255 & tmp >> 16);
            b[2] = (int) (255 & tmp >> 8);
            b[3] = (int) (255 & tmp);

            long[] c = new long[4];
            c[0] = S_BOX[(int) (255 & b[0])];
            c[3] = S_BOX[(int) (255 & b[1])];
            c[1] = S_BOX[(int) (255 & b[2])];
            c[2] = S_BOX[(int) (255 & b[3])];

            int tmp1 = BigInteger.valueOf(leftShift(c, 0)).intValue();
            buf[i + 4] = (buf[i] ^ tmp1 ^
                    ((tmp1 << 2) | (tmp1 >> 32 - 2)) ^
                    ((tmp1 << 10) | (tmp1 >> 32 - 10)) ^
                    ((tmp1 << 18) | (tmp1 >> 32 - 18))) ^
                    ((tmp1 << 24) | (tmp1 >> 32 - 24));
        }
        long[] result = new long[16];
        rightShift(buf[35], result, 0);
        rightShift(buf[34], result, 4);
        rightShift(buf[33], result, 8);
        rightShift(buf[32], result, 12);
        return result;
    }

    private static long[] handleByMode(long[] array) {
        if (mode == 1) {
            int tmp = 16 - array.length % 16;
            for (int i = 0; i < tmp; i++) {
                array[array.length + i] = tmp;
            }
        } else {
            array = Arrays.copyOf(array, (int) (array.length - array[array.length - 1]));
        }
        return array;
    }


    private static long leftShift(long[] keyArr, int index) {
        return (255 & keyArr[index]) << 24
                | (255 & keyArr[index + 1]) << 16
                | (255 & keyArr[index + 2]) << 8
                | 255 & keyArr[index + 3];
    }

    private static void rightShift(long val, long[] arr, int index) {
        arr[index] = 255 & val >> 24;
        arr[index + 1] = 255 & val >> 16;
        arr[index + 2] = 255 & val >> 8;
        arr[index + 3] = 255 & val;
    }


    public static void main(String[] args) throws InterruptedException {
        String val = "9z1XtppWEJttZMOTqoPHeZ/cLkTB6OwK6l5gR0s9J1tEdcIpw92ww3I/HUvAyrohucH5cnYLQai9i8lIzLM6Erj2mpWvLg7ZLWjJVPwkZqbNIWPzXKn0c3hyAqVVbRpm+CjsZj1KQsHOqXLtDB1B/kCBRytmNuWhvyrVEDTahMXyMwb4UaPvsbwhZnsP3Ibz0H5Y/WLjDZeznH+FdTJ0zSB+YQWCzR3kYF/Kr/P/AImsPpJCNYmV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O6AT4wh5bxGdvLvR/PoLj9Wq0OgnSYdJcUXNthIn1jZmKkeW8m0A20/ayI10stcWHqjLJ7fu75DtUA6ZpzYDSJjIME0OtQDm2rQIH2v1aF+yDFhqFsEHCu0O3RfjhIE/iX1x3aA/Co/Dj29LFX3CFtkdFuvAicp1raFpXTtMgGdGIKQPcOF9lnGRpDknl3XJNke1pvlM5Ras67xmeMbOIBBowNqTG/27Cn82/CEDzmmYUJ0S8te9Xf6hTzh3lv1G/r2FNWWzx7Eh7kFuhDsBUaECNl2mIOXebJ08x+dRuxRUayzErzWs86iagV3tleTDiGXI8PjQGxUhnDgQ==";
//        val = "0SxJuaTAzTO55UPJfENzQd7ZXkw4hlyPD40BsVIZw4E=";
        System.out.println(DecMenuManager.mudata_kxc(val, "ZVPj52lqMGI2177r"));
    }
}
